fix to data flow