Improve conditions on transitions.