added the membership listener for agent to look when the master goes down.