fixing database file stuffs