fixes errors in scripts