Fix wrong javascript loading order