fixed Notice Error: Undefined index
Merge pull request #25 from williamn/master

fixed Notice Error: Undefined index