fixed bug in subcollection implementation