fixed issue 1182
Merge pull request #1192 from ne0fhyk/fix_issue_1182

Fix issue 1182