fixing last port number