Image resize script fix