fixed scripts to run correctly