search results limit correctly checking for bad values