Enhanced nexec to handle the port number as optional.