Fix to IP checks