release the index only if we actually got one