Fixed issues with layouts