Put counter reset in correct location