Bug fix. Added bs to w_* function call.