Rewrote automatic stop
Merge branch 'heartbeats-2'