Fix layout glitch when autosaving