Fixed seg fault in use of std::move()

Need to investigate further