Fix 1275
Merge pull request #3320 from xixixao/issue1275

Fix #1275