Fixed a bug on non-integer pixel ratio devices