Fixed the TiledMap parsing algorithm.