minor fixes to scripts