small fixes to Flow parsing