local state cleanup