added bug fix to atlas.py