sentences:  It is also possible that the mosque was named after him.During the 17th and 18th centuries, the edifice was heavily damaged in its upper parts by earthquakes, until Sultan Murad IV restored it, rebuilding the dome with the pendentives, almost the whole west side, the vaults at the southwest and northwest corners, and the minaret.The building escaped the great fire which ravaged the quarter in 1782, and was restored again by Sultan Mahmud II (1808–1839), who added the wooden Sultan's lodge.