fix fetching count bug