fixed bugg in code after removal of layouts