Fixed incorrect return of mimetype.