Fixed event handler for wxMenuItem