fix collection count bug