refactoring due to 2.10.x compilation bug