Fixed assertion problem when port is specified as string value.