fixed compilation errors due to code refactoring