Fix public search bug for logged in users.