fix bug in wsm