fix the edit DB problem