Test the stop flow functionality and fix the bug.