fix pam bug