Fixed bug in heartbeat server.