Fixed bug when starting to share on an already occupied port.