Add to sortedMap() and fix concurrency problem