added leader getting and corrected leader setting
v0.7.8