added trace.h fixed some segfaults