Patches for check_heartbeat [sf#1297525] [#550]