fix issue with script ordering