Fix to CLI and Web detection