Fixing some renderer bugs by changing the tricomparator algo