Re-arranged the code so that it's not trying to create more than one deproxy on the same port.