fixed issue 1120
Merge pull request #1188 from ne0fhyk/fix_issue_1120

Fixed issue 1120