Fix Atlas algorithm
Merge pull request #47 from Flamaros/master

Fix Atlas algorithm