Fixed a bug in Atom
Added comments