Fix driving flow function