fixed copy/move logic problems