fix logoff bugg