Fixed a bug that the violations are not cleared when it called more than once.