bug fixed for issue 709
Merge pull request #713 from wenshao/master

bug fixed for issue 709