avoids some memory leak