Fixed compilation problems in val.cc caused by merge.