fixes to scripts