Minor fixes to scripts