Fix another source of segfaults