fixed issue 1179
Merge pull request #1190 from ne0fhyk/fix_issue_1179

Fix issue 1179