fix typing
reorder js loading