Fixed a bug concerning illegal frames in BAM files for BAM exporter and
BAM converter