Test with valgrind