fixed undefined password issue