Jamie H - Fixed two memory leaks. There is still at least one memory leak remaining in this patch.