Fix issue 2265
Merge pull request #496 from timrae/fix_issue2265

Fix issue 2265