fixed comparison order