fix issue with comparing different classes