Fixed bug mentioned in #943
Merge pull request #997 from linzongshu/develop

Fixed bug mentioned in #943