Removed global leaks

While testing the new version in LevelGraph I found these two global leaks. You might want to add a JSHint file to catch those.