Fix compile order and saved selection attributes