added event handler, fixing the menu button not clicking