Fixing state query at terminating event