Fixed another bug in the label checking code