Fixed broken IP range check