fixes issue 773
Merge pull request #934 from wasade/issue773

fixes issue #773