Code optimization
Merge pull request #908 from WS64/master

Minor code optimization