Moved around stuff to prefer remote address if one is specified
Merge pull request #1 from PolicyStat/remote_server_fix

Moved around stuff to prefer remote address if one is specified