Atmos leak fix

Hopefully fixes #765