Added invalidate method.