resize script fix