Fixed bug with layouts