bug fixes in metatlas.py