Fixing bug 1245

--HG--
extra : source : 19322c52f83e890c35c794e96b37bb8d4492f8a1
Merge pull request #443 from einhverfr/master

Fixing bug 1245