Fix bug: removing DPEvent from empty list
Always sort the return value of select