Fix a few minor issues spotted in code review