Fix layout saving