Fix _getHistory() unpack error when out of bounds.