Fix layout crash.