Fixed mistake made with IP check

Fixed mistake made with IP check