Fixing document flow