substring search and page links fixed