GH-5 Removed invalid gates from output