Fixed bug in retrieving the users ip