fix rounding bug with unconventional tile sizes, close #2288