more complete flow fixes