Fixed a bug in emplace() function: should use allocator with move semantics