Add support for sorts.