minor fix
fixed memory leak