fix to delete query from history correctly (fix for localdiskstore api)