* fixed memory leak due to double allocation