Fixed compilation problems from last merge from next into sam_alt.