Fixed error while logging out.