Localized gravity and higher curvature terms