update primary master for more control option
fix heatbeat bugs between master and slave