fix string off-by-one bugs
update changelog
Merge branch 'master' into 0.9.6