Removed global leaks

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