Setup and teardown gives me a segmentation fault