Add check for localhost and default viewer to true