fixed looping heartbeat