Fix close after using TRIndex