fix layout selection