Bug 1804: the condition was not working correctly to report leader

Change-Id: Ie9b4d76f2cf623ecc17e17e3e64e6fe6a98c05be
Signed-off-by: Harman Singh <harmasin@cisco.com>
Merge "Bug 1804: the condition was not working correctly to report leader"