Fixed bug in bool conversion of expectation