fix logout exception