fixed bug with copied nodes being destroyed - close #495