Fixing use of _()
Removing race condition, by having update set only last_heartbeat.