fix bug with trancition