Fix a load of bugs. Fixed a render scaling bug.