Remove UB from script