Fix sort key mappings. Closes #38.