Fix undeterministic order for input socket creation