fixed ordering of script contents