Fix script menu sorting bug from earlier commit