various updates to determine which helps to ease memory leak problem