fix bug with non-json werkzeug requests