adjust ws stirpping code
Merge pull request #1629 from devoncarew/devoncarew_ws_strip

adjust ws stripping code