fixing bug 1282
Merge pull request #554 from einhverfr/1.4

fixing bug 1282