Fix a few flow corner cases