Fixes regression from 299f5b2b770648d
Merge pull request #896 from yurydelendik/issue-870

Fixes regression from 299f5b2b770648d