fixed possible NPE on Sequence.getSerieIndex() method.