Fixed the good_tile_shape bug.

Fixed the good_tile_shape bug.
Fixed bugs related to the good_tile_shape bug.