Search history bug fixed

it had a query set up incorrectly. simple fix.