BUG Fix issues in master

Fixes some issues

cc @simonwelsh