Fix a segmentation fault from the previous patch