commit before layout