Fixing compilation errors due to refactoring