Merged changes from 123809b and 87ed6b2.