Improve handling of atoms