bug fix for getting current IP.