fix increment_counter method