fix bam record set query