Memory corruption bug found. Was callocing space for gate* not gate :-P