Fix cli and web server mode slightly more