fix the db conflict bug