Fixing load order of script files