patch to fix logEvent API