fixed broken ast generation for selection nodes