Solved small bug on $transition

In case transition was processed in the middle of a $digest
it could fail