add patch for preserving js loading order