Fixing a potential character conversion error