fixed the eventHooks.js