Hi,
I am working on variant calling with a fungal genome. When I am trying to reorder my .bam file (sorted) using picard ReorderSam (picard v2.9.0) to be used further in GATK realignment & BQSR, it throws this error:

    Exception in thread "main" picard.PicardException: Discordant contig lengths: read scaffold1 LN=4751343, ref scaffold1 LN=4340956

Command I used,

    java -jar /path/to/picard.jar ReorderSam I=myfile.bam O=reordered.bam R=myreference.fa

I checked my reference.fa file and found that the length of scaffold1 mention was incorrect (4751343), so I corrected it (LN=4340956) and created the .dict file again. But, I am still getting the same error. 
Use option  ALLOW_CONTIG_LENGTH_DISCORDANCE=true

> If true, then permits mapping from a read contig to a new reference contig with the  same name but a different length.  Highly dangerous, only use if you know what you  are doing