Fixed port emit, it was using remotePort instead of localPort