Fixes

Each commit fixes a different issue.