 Klesl who regarded Ferdinand as the Jesuits' puppet continued to oppose his appointment as Matthias's successor.On 31 October 1616, Ferdinand and Maximilian III agreed to achieve the removal of Klesl, but Ferdinand wanted to conclude an agreement with Philip III about Matthias's succession before making further steps.Philip's new envoy at Vienna, Íñigo Vélez de Guevara, 7th Count of Oñate, and Ferdinand signed a secret treaty on 20 March 1617.