Confinement of gases to vicinity of substrate