Fixed unique count issues