fix the database issue