Let us examine the situation in Pakistan.
1. The nation of Pakistan is an ally of the United States of America in fighting terrorist groups.
2. The United States of American provides military assistance to Pakistan military forces.
3. Pakistan military forces provide military and other assistance to members of the Haqqani terrorist group which attacks US military forces in Afghanistan.
4. Drone attacks kill members of the Haqqani network.
5. Pakistan is upset that drone attacks kill leaders of their allies.
6. Pakistan is mainly concerned at this moment with receiving an apology from the US arising from confusion which led to killing of Pakistan troops.
7. Pakistan will cooperate in dealing with Taliban forces in Afghanistan as long as American forces do not kill leaders of the Taliban.
8. In other words, Pakistan wants to end terrorism by supporting terrorists.
9. Are you now clear?