fix bug in prefix search locations and 404 error if locations not founded