Adjusts script calls order