Fix bug when a badge is not found