Fixed bugs that the pixel numbers are not rounded.