Issue #2378. Minor additions. Implemented suggestions by WouterJ.