Fixed the tiling calculator