Add missing int casting to pixelRatio correction