Fixed bug in characterOffsets.