fixed a js return bug of testFlow