Various small fixes
Fixed script preserve on update