Fix layout saving issue
* fix #364