Fixed bug mentioned in #1024
Merge pull request #1025 from linzongshu/develop

Fixed bug mentioned in #1024