Fix within network check for subnets