fix issues with crash in pam module