fixed unit test bugs for wsd