Fixed capacity check in collection classes
Merge pull request #579 from hneuer/coll2

Fixed capacity check in collection classes