fix some layouts and change Pos to simple attributes