Fixed context passing for events