Fix multitouch infinite loop
First pass at handling state transitions