fixed the relayout problem