changes to avoid memory leak