Fixes a few minor issues unearthed during testing.