fixed problems with evaluation of expected

fixed problems that in some case „expected“ is not evaluated.