fixes for double-layout resizing