fixed wrapping on frame scaling