fix nearest test