Fix IP check