Added a mutex to Events send/receive to make it thread-safe