fixing so we can respond to both html and xml responses