Small changes to fix #2171, #2172, #2175.