strange pysam behavior