Fixed some problems with predict vector index calculations.