fixed a small memory leak when using -C