Fixes after a valgrind session