fixed minor memory leak