#720 fixes for issue about bug on generation link and port, if used only https protocol without port