Fix to work in hapi2
Merge pull request #18 from wraithgar/master

Fix to work in hapi2