Added some no-ports-handling.