bugfix - layout switching