fixed script loading/evaluation order