fixed a tiling bug