Fix typos
Add flow control and flow test