bugfix for a bug which caused a crash of the tool if too many ports are configured