fixed issues with layout switching