Attempting to resolve #2
Wrong variable.
Wrong variable.
Proxy to callbacks.
Merge pull request #3 from mikeal/error-fixes

Error fixes for #2