Fixing undefined offset notice if fields are empty.
Merge pull request #7 from chronon/master

Fixing undefined offset notice if fields are empty