added xhook issue/19 fix