Encoding fix 1.4.5

See other pull requests for more info