Encoding fix for #19