fixed memory tracking