fix issue when logging out