better heartbeat handling in the shell

reset heartbeat message, if any, when new heartbeat received