Fixed some double frees