better invariant check output
fixed malicious behavior flag