Corrected determination of package ID