fixed two compilation erros due to refactoring