fix for multibyte characters of 3 bytes+