fixed link flattening