fix compound.py so that demo6 and demo10 run again
(#467)