Fixed Bug for Counter