#17 Fix that the toolbar remains in inconsistent state.

Modified that some conditions (else clause) are not handled.