fixing database