Adding invalidate event