fix bug when the actual and expected are of different classes.