Fixed bug for comparing struct.