add modal flag to flows. if a flow is modal it is released after being deactivated.