debugging and fixing the tile viewing.