fixes for issues found during testing