Two small simple optimizations