Fix #1106
Fix failing tests.
Merge pull request #1117 from sigmavirus24/issue1106

Fix #1106