prevent index out of range when parsing raw line