Fixed #50 : by setting 'definingProtocol' to true before switching the menu items.