From that snippet (hint: post the whole thing) it looks as though there should be a transition to state two. It may simply be that the transition occurs but that the state two code doesn't do what you expect. Prove it to yourself with a serial.print statement in each case.