Fixed queue counter bug