fixed fgets was getting 1 less than needed