a few bugfixes in dataflow code