Fix pagination navigation while searching

Pagination wasn't taking into account "found" variable while assembling the navigation links when the current mode was "search".