fixed critical key counter bug