Fix javascript load order