some logic and layout changes in the advanced panel, should be better