Fix handling of contentScaleFactor != 1

Fix handling of contentScaleFactor != 1