fixed valgrind error in grey test program