Merging r780:797 from trunk to branches/0.3.