Fix handling ports listening monitoring variable.