fixed compile errors from refactoring