fixes variable reassignment bug

This fixes a major issue where the ip addresses aren't being saved properly due to variable reassignment.
As soon as this gets pulled in we'll need to release a new version.

Speaking of which - would it make sense to add me as a contributor to your repo so I can push fixes directly?  If you trust me to put out decent code and save you time that is :)