Fix bug for printing badge