Fixed a bug with the heartbeats not beeing stored