Fixing broken use of move semantics.