Fix layout escape bug