Changed allocators for thread-safety.