Fix segfault in previous commit