InvalidOperationException arose, fixed with 2 layouts