minor code optimizing optimizing
Merge pull request #910 from WS64/master

minor code optimizing