fix setting layout bug