Improve Issue 10220 fix.

Improves pull #1329.

Issue URL: http://d.puremagic.com/issues/show_bug.cgi?id=10220
Merge pull request #1334 from denis-sh/improve-Issue-10220-fix

Improve Issue 10220 fix.