Since we're correcting grammar, "if gateway is present", not "if is gateway present" :-)