removed sort from scriptgates