Fix layout cap issue