fix merge conflict with PR #1006
fix NPE in trac #10538