fix order of script