Fixed parser.py

Solved indexing issues using workaround, maybe better way available.