fix issues #509
Merge pull request #510 from jacking124/master

fix issues #509