fixes deleting local database method