fixed check_password