fix layout issue w.r.t. layoutSizeAware, and bugs #1714, #1713, #1712