fixed tilemap get index