fixed reset local database bug with sqlite