many fixes to script