fixed errors in script