github won't let me comment on this line, but I think we have a superfluous `resetTransition` on line 226