Fixing flows builder to use new data structure