fixed comparison of objects