Fixes #7903
Merge pull request #7908 from skirpichev/7903-fix

Fixes #7903