fix issue #764
Merge pull request #765 from shawnzhu/764

fix issue #764