add more tests to issue #196 and simplify a little bit the IfStatement hook.

see #196