fixed update local database bug