A note on a theorem of Nirenberg