fixes variable reassignment bug
Merge pull request #11 from beck24/ip-reassignment-bug

fixes variable reassignment bug