A couple fixes related to scaling.

- Fix for inaccurate x and y when scale is not 1.
- Fix for incorrect debug rectangle positions when scale is not 1.