Fixes a bug when the file contains unicode data. #242