Fixed issue #1066
Merge pull request #2311 from LaurentGoderre/fix-1066

Fixed issue #1066