mod_rayo: fixed prompt state machine - wrong state transition when output finishes before input starts