fixed adapter undefined indexes and illegal string offsets
Merge pull request #267 from abgit/master

fixed adapter undefined indexes and illegal string offsets