fix collection bugs.