Adding fix for catching protocol with hostname