[TASK] Adjust to recent API changes in Flow