fix several API endpoints returning wrong content type