Two small speed fixes.