Fixed memory error (double free/memory leak(?)/general fuckery)
Fixed memory leak.