tidy up from some script, fix of bug #012564