Sort before slicing

Signed-off-by: Tim Smart <tim@fostle.com>