fix mimetype check for packages