Fixed problem with layout selection