Sultan Ibrahim, at Herat and Nishapur