moved scripts to head to guarantee load order