fix #788
Merge pull request #797 from tshepang/issue788

fix #788