Fix bug of tiling method.

Old one overruns when the paper is cut smaller.