Fix import rules based on IP (fix too sql error). closes #2320