Fix cmd+Q invalidating the layout somehow