Fixed issue where encoding was not detected properly