It fixes #312
Merge pull request #352 from stalniy/issue-312

It fixes #312