Fixed to use multibyte functions