bugfix for some script behaviour