fixed compile errors due to refactoring