[#1995] little refactoring