fixed bug in set_password function