Fixed multibyte size problem and removed debugging code.