fixes ip format detection