updated the collection classes

disposed method now calls the reset method in order to fix foreach
problem