fix for ignoring byte codes at the end of a string