Fixed some double delete errors