core.layout: fixes