fixes script issues in prod environment