bug fixed for merged code
Merge pull request #603 from wenshao/master

bug fixed for merged code