fix next_valid_slug sorting problem