When the storm had passed, Ibn Sina returned with the emir to Hamadan, and carried on his literary labors.