Made some fixes to search controller