Fixed a bug in events.js - it was referencing 'ping' from before, now it using 'latency'