Fixed issue #2558
Minor refactoring
Merge remote-tracking branch 'origin/1.7.5' into 1.7.5