Valgrind errors handled (no more double deletes)