Fixing a memory leak found by @IPCStudios