fixing bug 1284
Merge pull request #553 from einhverfr/1.4

fixing bug 1284