Fix bugs in FlowField Algo