fixed adapter undefined indexes and illegal string offsets