Fixing bug 1142

--HG--
extra : source : 8f2dbbacbe6a6c4cf7f2105079e6fb5fe93afc04
Merge pull request #232 from einhverfr/master

Fixing bug 1142