fixed segfault that I thought I had already fixed.