Change to use eventCounter
small bug fixed