fix database error aka fix destroy-chain