fix issue 517
Merge pull request #657 from mamamiapeguin/master

fix issue 517