Fix problematic search query handling, redirect('?clear=1') does not work