fix closing of indexer (implements io.Closer() now)