some flow fixes