fix equal: empty range check