Fixing database file