tiles.py bugfixes mostly