fix #1021
Merge pull request #1035 from bronze1man/pr-1021

fix #1021