Issue 943

Removes potential memory leak