Fix #181. Make invalidate method public.