fixed counter issues