Fixes offset overflow in retile