Improve Gate buffer setup