Fix crash when #number of violations is incorrect.