Trying to spawn multiple gates - getting segfault