fix mistake in bsearch