Fixed documentation and added croak message for invalid strings with offset