Had port assignment logic backwards.