Fix state update leak.