set_credential bug fixed