fix state transition. update spec