fixed the ROOT problem and fixed the layouts