fixed database cannot save