Fix #249: change parameter from v to n in the search function