Fixed a memory leak... hopefully.