fixed a undefined index bug
Merge pull request #72 from Schrank/fabian/bug-71

fixed a undefined index bug