fixed the layout and canvas engine