fix CW update equation: #277

If CW update equation is not correct, please use this.