fixed bug with violation loop