Fizxed a few bugs with scaling in the renderer.