Fixed relayout when attributes changed