minor optimizations during bug-hunting