Fix wpeditor sorting bug