some fixes to scripts