fix end_of_tiles_x