Fixed error for non-logged in users