Merge "Fix issues blocking election handler thread"