Fixed use of ports in demand.py