fixed a crash bug in the heartbeat server