before dispatch event to main right