I believe you can remove initialLayout and use initialEntry.getLayout() directly