Fix logic bug that sets port to default 80/443