fixes #18

Updated method for obtaining the request's host. Should fix #18