Reworking fix from 1.3

--HG--
extra : source : 6b5577960801a227ad9fce697dc5056c285cf405
Merge pull request #205 from einhverfr/master

Reworking fix from 1.3