many fixes to wservice

many fixes to wservice