fix bst map function; fix ring shard allocation