fixed portrule error when port isn't specified