Fixed some issues with files in different encodings