The role of ridges in the formation and longevity of flat slabs