Added a workaround for a pysam bug.