fix exception when hook is passed an if parameter
* exception: ArgumentError (wrong number of arguments (0 for 1..3))