Fix bug in CWS

It was introduced in 23cee64ee3a59c779a7e8f93584a82ba668b2821