remove console.log
deal with empty host