Fix javascript loading order.