Reorder functions so we can use heartbeat in grab.