fixed a bug in bio.bam.writer