Made fixes to scripts