Fix PAM ID calculation

Fixed zero offset in PAM ID calculation