Fixed a warning in PunishmentListener