Fixed bug when port parameter is not passed to library