fix memory leak in list test
precendence bug