Fixed bug. Comparing objects of different classes