fix deprecated mimetype warning