Fixed current state logic.
check again that we really have a state change after popping the busy state. Otherwise we can end up e.g. with two error states on the stack, so one will stay forever.