Hopefully fixed flow diagram