fix heartbeat extension bugs to support mutiple extensions