Fix maintenance script that populates the ip_changes table