change deep copy for scripts