Modified removeCollectionWithId method