Prevent XG Error on Logout