fix nearentities checks