Fix move function.