added support for $PORT and $port.