Fix a bug in the flow layout.