Sort segments before removing them
version update