Fix layout consistency bug when conf changes.