Fix some web service bugs