bug fix: when remove credential, in database credential already exists