Fix a few compile issues found during testing