fixed selector sorting bug