Move equal check below less check for removing an additional condition