changed script loading order