Further fixes

Quite a few fixes