Added sleeps to wait for a proxy connection