Corrected key ordering