Updated SparkProtocol's event() implementation