Fixed capacity check in collection classes