Fix #1630: Clean IP Addresses SQL error