Added sort_field for consistent sorting