Fixes X and Y inaccuracy when scale is not 1.