Fix bug on encoded file