Fix illegal transitions, cover RETRYWAIT case