 During the 19th century, Mahmud II (r. 1808-1839) rebuilt the porch.In 1847–1848, Sultan Abdülmecid I (r. 1839–1861) let the wall which encircles the complex be rebuilt.Some years later two fountains were erected in the yard of the mosque.