Fixed memory leak in symbol retrieval