actually check the port when allocating
v3.1.1