addtional memory leak fixes (might be chrome & firefox bug)