fix bug where passed allowedMediaTypes options not considered