Fixes for #7

As requested in #7 I've create this pull request to check the differences to the oxford fork.
It seems that they can't be merged automatically so some manual effort is required.