[BugFix] #861
Merge pull request #886 from MichaelKalygin/bugfix861

[BugFix] #861