Fixed gate StackOverflow.