Few valgrind-fixes