fixed a bug when protected service returns a response with an invalid format