small refactoring
Merge pull request #1537 from WalterBright/b28

small refactoring