Bug fixes in atom tracking