Fix crash when using password auth