Fixing bug 1142
Merge pull request #231 from einhverfr/1.4

Fixing bug 1142