fixes the compare bug