Small improvements found while debugging.