Fixed nil error when there were no search params