tweaks to shutdown procedure. Going back to Valgrind