fixed small memory bug when saving IndexedBWT data structure