ensuring proper mimetype