fixing count issues