Fix a bug

Handle the situation of that the row/col of image is divisible by the block size