Fix behaviour when console is not run from cli