avoids a potential memory leak