fixed error when logged out