fixed bug in samtools sort command