Fix errors caused by non logged in users