Added some code to try to make TiledMap to work