Fixes for milestone 1.7.2 release (issues 315, 345).