Fix #2 for SEGFAULT caused by recent performance patch.

(Even I missed a few spots too! Hopefully this now fixes it for good!)