Fix problems comparing bean properties of different types.