fix heartbeat example problem