Changed method to get client's IP address