Fixed check for localhost and returned message