fix script ordering