fixed bug in calling wmult
(#325)