He has also repeatedly said there is no plans for attacking Israel or the US but that doesn't amount to anything apparently.
anyway...
Ali Khamenei has much more power in Iran than the president and last I heard he told Ahmadinejad to 'stay out of all matters nuclear'
Interview with Khamenei