Fixed the buggy implementation of the id pool (did give out fewer elements as capacity, with repeated operations capacity was further reduced).