Partially fix state revisiting bugs