fixes capacity bug