Small tweaks to handle unicode issue