Fix bug in pam.js