possible memory leak fixed