Fixed the chachedCount issue