Adding $scale option on scaleResize and moving from (int) to round() for scaling