Atmos leak fix

Fixes #765