Tweaked prefix search, to shorten line length