Changing order of loading scripts to address #3162.