fixed an ordering issue of the scripts