Fixed anoying bugs in web services.

Signed-off-by: Ryeyao <rye.y.cn@gmail.com>