That despite being more electronegative, oxygen has a lower ionization than the less electronegative Nitrogen. This is because of a paired electron in oxygens 2p subshell. Which causes electron electron repulsion which decreases the ionization energy because it would be easier to remove.