added horizontal layout fixed onRestore