change the js order to avoid the delay