Update to work with YANA2

Fixes #1