Add closing for with statements