Fixes

Fixes a number of issues