Fix pkgutil bugs in version, available_version