Fix memory leak from previous commit