Apple Inc. Chief Executive Officer Tim Cook said he’s “hopeful and optimistic” the intergovernmental Organization for Economic Co-Operation and Development will strike a deal on corporation tax, as his company battles the European Union over a tax bill.

Speaking at an event in Dublin on Monday, Cook said the debate on taxing “complex” multinational companies needs to take place at a global level. The OECD is meeting with countries this year about a plan to overhaul the tax system and address concerns that these firms, particularly tech giants, aren’t paying taxes in the right amounts or to the right countries.

“Everybody knows” the system needs to be overhauled, Cook said, acknowledging it isn’t perfect. While law can’t be “retrofit,” Cook said he “desperately” wants taxes to be fair.

Cook’s comments came as the company battles the EU after the bloc imposed a tax bill of as much as 13 billion euros (US$14.4 billion) plus interest on the company, claiming Ireland illegally gave it special treatment that lowered Apple’s liabilities. Apple, which has appealed the decision, is the largest taxpayer in the world and has followed all tax laws, Cook said. Ireland also said it did nothing wrong.

Cook visited Dublin to receive an award from Irish Prime Minister Leo Varadkar for his company’s contribution to the nation’s economy since it set up a base there in the 1980s. It employs more than 6,000 people in Cork.