Pakistan replaced head coach Sarfaraz Ahmed and bowling coach Umar Gul, while also sending seven players home after losing the first two Tests at Headingley and Lord's.