Updated secondary sort support