fix pull 2441
fix test code
Merge pull request #2537 from WalterBright/fix-pull-2441

fix pull #2441