fixed rare invalid read in tilemap