fixed the count issues