update for layout and scale9