Corrected paramters to handleflow()