Added IP address checking