Fixing end of flow detection inside of Flows.Update.