fixing incorrect move operation on OSX