Fix segfault when wrapping category and condor