Changed heartbeat packet parser to avoid bug causing excessive lagging