fixing valgrind: constructor