bug fixed string conversion of port