fixed memory issues.
fixed memory issues.