You just have to find reasons why this wouldn't happen for dwarfs. For example, maybe dwarfs have a lung system that is much more durable than humans, allowing them to filter most poisonous gases out of their system safely.
Maybe they grow some special fungi that produces enough breathable air...