fixing minor errors in the scripts