fix #390. multiple response.WriteHeader when querying as admin