Fix move operation

superseeds #163 , adding another bugfix for the move operation.