fix ref id in sam format