Updated compartment.py