Fixed bug in TEST_heartbeat