Fixed some bugs in WebService