Improved checking for unconnected ports