fixed bugs to return leader member id properly